package com.crl.gClient.scene
{
	import com.crl.gClient.Player;
	import com.crl.gClient.manager.MapManager;
	import com.crl.gClient.state.action.TeleportAction;
	import com.crl.gClient.state.action.WalkAction;
	import com.crl.manager.scene.AbstractScene;
	import com.crl.map.controller.MapController;
	import com.crl.map.model.MapModel;
	
	import flash.geom.Point;
	
	public class SceneMap extends AbstractScene
	{
		public static const TYPE:String="map";
		public function SceneMap()
		{
			super(TYPE);
		}
		
		override public function initialize():void{
			
			var mapmodel:MapModel=new MapModel();
			var entrancePoint:Point=mapmodel.getEntreace();
			
			var mapController:MapController=new MapController();
			mapController.setModel(mapmodel);
			
			addChild(mapController.getView());
			
			var p:Player=new Player(1);
			
			mapController.addActorProxy(p);
			mapController.hero=p;
			
			p.requestAction(new TeleportAction(entrancePoint));			
		}
	}
}